#ifndef UT_DM_DEFINES_H
#define UT_DM_DEFINES_H

#define MAXNAME 32

#define UTE_OK		  0
#define UTE_NOMEM	 -1
#define UTE_HFERROR	 -2
#define UTE_AMERROR	 -3
#define UTE_MALLOC	 -4
#define UTE_ATTRNOTFOUND -5
#define UTE_RELNOTFOUND  -6

#define UTE_SCM_ZEROARGS	-100
#define UTE_SCM_DUPLICATEARGS	-101
#define UTE_SCM_ARGNUM		-102
#define UTE_SCM_RELEXISTS	-103
#define UTE_SCM_RELNOTEXIST	-104
#define UTE_SCM_WRONGOP		-105
#define UTE_SCM_INDEXEXISTS	-106

//dika mas erros
#define UTE_HF_ERROR -200
#define UTE_SELECT -201
#define UTE_INDEX -202
//#define AME_EOF -203
#define SCM_CREATE -204
#define SCM_INSERT -205
#define SCM_SELECT -206
#define UTE_EXISTS -207
#define SCM_ONEREL -208
#define SCM_MAXNAME -209
#define UTE_CREATE -210
#define UTE_BUILD_INDEX -211
#define UTE_DESTROY -212
#define CFME_INDEXED -213
#define UTE_NOT_FOUND -214
#define SCM_DELETE -215
#define UTE_OPERATOR -216
#define SCM_JOIN -217
#define UTE_JOIN -218
#ifndef PRAGMA_ENA
#pragma pack(1)
#endif

typedef struct {
    char relname[MAXNAME];
    int relwidth;
    int attrcnt;
    int indexcnt;
} relDesc;

typedef struct {
    char relname[MAXNAME];
    char attrname[MAXNAME];
    int offset;
    int attrlength;
    char attrtype;
    int indexed;
    int indexno;
} attrDesc;


int relCatFd;
int attrCatFd;
int UTE_errno;

#endif /* UT_DM_DEFINES_H */
